package com.cj.mobile.iabp.mvp.model.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @ProjectName: AptitudeAndroid
 * @Package: com.cj.mobile.iabp.mvp.model.entity
 * @ClassName: StoreModelInfo
 * @Description: 门店型号
 * @Author: WLY
 * @CreateDate: 2022/9/19 16:20
 */
public class StoreModelInfo implements Parcelable {
    public StoreModelInfo() {
    }

    public StoreModelInfo(String mId, String mName, double price, String unit) {
        this.modelId = mId;
        this.modelName = mName;
        this.price = price;
        this.unit = unit;
    }

    public StoreModelInfo(String modelId, String modelName, String unit, double weight) {
        this.modelId = modelId;
        this.modelName = modelName;
        this.unit = unit;
        this.weight = weight;
    }

    // 型号ID
    private String modelId;
    // 型号名称
    private String modelName;
    // 单价
    private double price = 0.00;
    // 单位(块)
    private String unit;

    // 重量
    private double weight;

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public String getModelId() {
        return modelId;
    }

    public void setModelId(String modelId) {
        this.modelId = modelId;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.modelId);
        dest.writeString(this.modelName);
        dest.writeDouble(this.price);
        dest.writeString(this.unit);
        dest.writeDouble(this.weight);
    }

    public void readFromParcel(Parcel source) {
        this.modelId = source.readString();
        this.modelName = source.readString();
        this.price = source.readDouble();
        this.unit = source.readString();
        this.weight = source.readDouble();
    }

    protected StoreModelInfo(Parcel in) {
        this.modelId = in.readString();
        this.modelName = in.readString();
        this.price = in.readDouble();
        this.unit = in.readString();
        this.weight = in.readDouble();
    }

    public static final Creator<StoreModelInfo> CREATOR = new Creator<StoreModelInfo>() {
        @Override
        public StoreModelInfo createFromParcel(Parcel source) {
            return new StoreModelInfo(source);
        }

        @Override
        public StoreModelInfo[] newArray(int size) {
            return new StoreModelInfo[size];
        }
    };
}
